<!DOCTYPE html>
<meta charset="utf-8">
<style>
  body {
    font: 10px sans-serif;
    padding-left:10px;
  }

  svg text{
    fill:#fff;
    font-size:13px;
  }
  svg .values text{
    pointer-events:none;
    stroke-width: 0.5px;
  }
  .groups:hover{
    cursor:pointer;
    font-weight:bold;
  }
  .groups text {
  }
</style>
<body>
<script src="/static/jiaxingdataview/d3/shujudapan/d3.v4.min.js"></script>
<script src="/static/jiaxingdataview/d3/shujudapan/viz.v1.1.0.min.js"></script>
<script>

  var data = [
    ['走班制选课系统','天闻ECO云开放平台',60],
    ['决策系统','天闻ECO云开放平台',50],
    ['远程培训','天闻ECO云开放平台',20],
    ['教育云','天闻ECO云开放平台',150],
    ['智能排课','天闻ECO云开放平台',20],
    ['校比邻','天闻ECO云开放平台',40],
    ['学生成长档案','天闻ECO云开放平台',60],
    ['教师成长档案','天闻ECO云开放平台',70],
    ['考务管理系统','天闻ECO云开放平台',160],
    ['德育管理系统','天闻ECO云开放平台',120],
    ['日常管理系统','天闻ECO云开放平台',90],
    ['教学计划管理系统','天闻ECO云开放平台',80],
    ['综合素质评价','天闻ECO云开放平台',10],
    ['云课堂','天闻ECO云开放平台',25],
    ['在线直播','天闻ECO云开放平台',78],
    ['AI作业','天闻ECO云开放平台',35],
    ['数据机器人','天闻ECO云开放平台',150],
    ['校园缴费系统','天闻ECO云开放平台',150],
    ['决策系统','校比邻',40],
    ['教育云','校比邻',140],
    ['学生成长档案','校比邻',50],
    ['教师成长档案','校比邻',70],
    ['AI作业','校比邻',140],
    ['在线直播','校比邻',80],
    ['综合素质评价','校比邻',30],
  ];

  var colors = {
    "走班制选课系统":         "#da4480"
    ,"决策系统":    "#5ab449"
    ,"远程培训":    "#7f5acd"
    ,"教育云":        "#aab740"
    ,"智能排课": "#ce58c0"
    ,"校比邻":        "#50a26e"
    ,"学生成长档案": "#d1434b"
    ,"教师成长档案":      "#45c0bc"
    ,"考务管理系统":"#ce5929"
    ,"德育管理系统": "#4e7bda"
    ,"日常管理系统":  "#d49d3c"
    ,"教学计划管理系统":   "#6660a3"
    ,"综合素质评价":    "#7b853c"
    ,"云课堂":     "#b58dde"
    ,"在线直播":     "#97622e"
    ,"AI作业":   "#609dd6"
    ,"数据机器人":      "#e29074"
    ,"校园缴费系统":        "#9c4b88"
    ,"天闻ECO云开放平台":  "#ab505f"
  };

  var sortOrder =[
    "Arsenal"
    ,"Aston Villa"
    ,"Bournemouth"
    ,"Chelsea"
    ,"Crystal Palace"
    ,"Everton"
    ,"Leicester City"
    ,"Liverpool"
    ,"Manchester City"
    ,"Manchester Utd"
    ,"Newcastle Utd"
    ,"Norwich City"
    ,"Southampton"
    ,"Stoke City"
    ,"Sunderland"
    ,"Swansea City"
    ,"Tottenham"
    ,"Watford"
    ,"West Bromwich"
    ,"West Ham Utd"
  ];

  function sort(a,b){ return d3.ascending(sortOrder.indexOf(a),sortOrder.indexOf(b)); }

  var obj = window.parent.document.getElementById("shujudapanChart");
  var width = window.getComputedStyle(obj).width
  var height = window.getComputedStyle(obj).height
  if(width && width.indexOf("px") > -1){
    width = width.replace("px", "")
  }
  if(height && height.indexOf("px") > -1){
    height = height.replace("px", "")
  }
  width -= 20
  height == 100
  var ch = viz.ch().data(data)
    .padding(.01)
    .sort(sort)
    .innerRadius(width/4 - 20)
    .outerRadius(width/4)
    .duration(1000)
    .chordOpacity(0.3)
    .labelPadding(.05)
    .fill(function(d){ return colors[d];});


  var svg = d3.select("body").append("svg").attr("height",height).attr("width",width);

  svg.append("g").attr("transform", "translate(" + width/2 + "," + height/2 + ")").call(ch);

  // adjust height of frame in bl.ocks.org
  d3.select(self.frameElement).style("height", height+"px").style("width", width+"px");
</script>
